package com.isoftstone.common.service;

import com.isoftstone.common.Page;
import com.isoftstone.common.Tidings;
import com.isoftstone.common.entity.SysUser;
import com.isoftstone.util.PageData;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
import java.util.List;


public interface ISysUserService extends Serializable{
	
    SysUser getUserByUserName(String userName) throws Exception;

    SysUser getUserDeptById(String userId)throws Exception;

    List<SysUser> getUserlistPage(Page page) throws Exception;

    List<SysUser> getBankUserlistPage(Page page) throws Exception;
    
    SysUser getShowUser(String userName) throws Exception;

    Integer getUserRetryCount(@Param("userName") String userName)throws Exception;
    /**
     * 保存登录IP
     * @param user
     * @throws Exception
     */
    void saveUserIP(SysUser user)throws Exception;

    /**保存用户
     * @param user
     * @throws Exception
     */
    void saveUser(SysUser user)throws Exception;


    /**修改用户
     * @param user
     * @throws Exception
     */
    void updateUser(SysUser user)throws Exception;

    /**批量删除用户
     * @param userIds
     * @throws Exception
     */
    void deleteAllU(String[] userIds)throws Exception;

    void updateRetryCount(String userName, Integer retryCount)throws Exception;

    String getuserIdByuserId(String userid)throws Exception;
//根据system，商户编号，员工编号查找
    SysUser getSysUserByCorpIdAndUserId(String corpId,String userId) throws Exception;

    String getnumber()throws Exception;

    SysUser getUserById(String userid) throws Exception;

    SysUser getUserByRoleId(String roleId)throws Exception;

    void deleteSysUserbyUserId(String userid) throws Exception;

    /**
     *保存商户管理员
     * @param sysUser
     * @param request
     * @param user
     */
    Tidings<String> saveMercantManager(SysUser sysUser, HttpServletRequest request, SysUser user) throws Exception;
        //根据userid和corpId删除
    void deleteSysUserbyUserIdandCorpId(String userid, String corpId)throws Exception;

    SysUser getBankUserByUsercode(String usercode);

    int updateUserStatus(String usercode, String status);

    String[] getMerchantUserListByCorpIds(PageData pd);

    String[] getFeeUserListByCorpIds(PageData pd);

    String getUserCodeByUserCode(String userCode)throws Exception;


    String getStatusBycomUserCode(String comUserName)throws Exception;

    List<SysUser> getallUser()throws Exception;
}
